import request from '@/utils/request'

export function listProvince(query) {
  return request({
    url: '/module/area/listProv',
    method: 'get',
    params: query
  })
}
export function listProvinceNoPage(query) {
  return request({
    url: '/module/area/listProvNoPage',
    method: 'get',
    params: query
  })
}


export function listCity(query) {
  return request({
    url: '/module/area/listCity',
    method: 'get',
    params: query
  })
}
export function listCityPage(query) {
  return request({
    url: '/module/area/listCityPage',
    method: 'get',
    params: query
  })
}


export function listAllArea(query) {
  return request({
    url: '/module/area/getAllArea',
    method: 'get',
    params: query
  })
}

export function listDistrictPage(query) {
  return request({
    url: '/module/area/listDistrictPage',
    method: 'get',
    params: query
  })
}


export function listDistrict(query) {
  return request({
    url: '/module/area/listDistrict',
    method: 'get',
    params: query
  })
}


export function listTownPage(query) {
  return request({
    url: '/module/area/listTownPage',
    method: 'get',
    params: query
  })
}

export function listTown(query) {
  return request({
    url: '/module/area/listTown',
    method: 'get',
    params: query
  })
}


// 查询【请填写功能名称】详细
export function getTown(townId) {
  return request({
    url: '/module/area/town/' + townId,
    method: 'get'
  })
}


export function addTown(data) {
  return request({
    url: '/module/area/town',
    method: 'post',
    data: data
  })
}

// 修改【请填写功能名称】
export function updateTown(data) {
  return request({
    url: '/module/area/town',
    method: 'put',
    data: data
  })
}

// 删除【请填写功能名称】
export function delTown(townId) {
  return request({
    url: '/module/area/town/' + townId,
    method: 'delete'
  })
}


export function listCommunityPage(query) {
  return request({
    url: '/module/area/listCommunityPage',
    method: 'get',
    params: query
  })
}

export function listCommunity(query) {
  return request({
    url: '/module/area/listCommunity',
    method: 'get',
    params: query
  })
}


// 查询【请填写功能名称】详细
export function getCommunity(townId) {
  return request({
    url: '/module/area/community/' + townId,
    method: 'get'
  })
}


export function addCommunity(data) {
  return request({
    url: '/module/area/community',
    method: 'post',
    data: data
  })
}

// 修改【请填写功能名称】
export function updateCommunity(data) {
  return request({
    url: '/module/area/community',
    method: 'put',
    data: data
  })
}

// 删除【请填写功能名称】
export function delCommunity(townId) {
  return request({
    url: '/module/area/community/' + townId,
    method: 'delete'
  })
}
